package com.say.framework.core.util;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Constant {
    /**
     * 作业批改超时时间，30分钟
     */
    public static final int HOME_WORK_OUTTIME = 30;

    /**
     * 难题解答超时时间，20分钟
     */
    public static final int PROBLEM_OUTTIME = 20;

    /**
     * tb_lib_manager中校长的类别
     */
    public static final int SCHOOL_MASTER_TYPE = 6;

    /**
     * tb_lib_manager中馆长的类别
     */
    public static final int CURATOR = 4;

    /**
     * tb_lib_manager中在馆老师的类别
     */
    public static final int TEACHER_TYPE = 2; 

    /**
     * tb_lib_manager一对一的老师类别
     */
    public static final int KMT_121_TEACHER_TYPE = 7;  

    
    /**
     * tb_lib_manager中线上老师，和kmt 的老师
     */
    public static final int KMT_122_TEACHER_TYPE = 8;

    /**
     * tb_lib_manager小课老师的type
     */
    public static final int GROUP_TEACHER_TYPE = 9;

    /**
     * tb_lib_manager中学科老师的类别
     */
    public static final int ORG_TEACHER_TYPE = 10;

    /**
     * tb_lib_manager中管理员的类别
     */
    public static final int CORRECT_MANAGER= 11;

    /**
     * tb_lib_manager中超级管理员的类别
     */
    public static final int CORRECT_SUPER_MANAGER = 12;

    /**
     * tb_lib_manager中匹配知识点老师的类别
     */
    public static final int KNOW_MATCH_TYPE = 13;

    /**
     * 质检员类别
     */
    public static final int HOMEWORK_CHECK_TYPE = 14;
    
    
    /**
     * tb_lib_manager 机构作业自批改老师
     */
    public static final int LIB_TEACHER_TYPE = 15;
    
    /**
     * 作业批改
     */
    public static final int TEACHER_TASK_HOMEWORK = 1;

    /**
     * 难题反馈
     */
    public static final int TEACHER_TASK_RPOBLEM = 2;

    /**
     * 作业批改
     */
    public static final int TEACHER_TASK_WORKFEEDBACK = 3;

    /**
     * 年级
     */
    public static final List<String> GRADE_LIST = Arrays.asList("一年级", "二年级", "三年级", "四年级", "五年级", "六年级");

    /**
     * 学期
     */
    public static final List<Integer> SEMESTER_LIST = Arrays.asList(1, 2);

    /**
     * 服务列表
     */
    public static final Map<String, String>  SERVICE_MAP = new HashMap<String, String>();
    /**
     * 录入
     */
    public static final String   CMB_DF_STATUS_I                         = "I";
    /**
     * 成功
     */
    public static final String   CMB_DF_STATUS_S                         = "S";
    /**
     * 失败
     */
    public static final String   CMB_DF_STATUS_F                         = "F";

    /**
     * 正在获取状态
     */
    public static final String   CMB_DF_STATUS_C                         = "C";
    
    /**
     * 录入
     */
    public static final String   WITHDRAWAL_STATUS_INIT                  = "INIT";
    /**
     * 重新
     */
    public static final String   WITHDRAWAL_STATUS_REINIT                = "REINIT";
    /**
     * 错误
     */
    public static final String   WITHDRAWAL_STATUS_ERROR                 = "ERROR";
    /**
     * 成功
     */
    public static final String   WITHDRAWAL_STATUS_SUCCESS               = "SUCCESS";
    /**
     * 失败
     */
    public static final String   WITHDRAWAL_STATUS_FAIL                  = "FAIL";
    
    /**
     * 注册老师
     */
    public static final String   REGISTER_TEACHER                  = "注册老师";
    
    /**
     * 资深老师
     */
    public static final String	SENIOR_TEACHER               = "资深老师";
    /**
     * 明星老师
     */
    public static final String   STAR_TEACHER                  = "明星老师";
    /**
     * 学霸老师
     */
    public static final String   SUPER_TEACHER                  = "学霸老师";

    /**
     * 小课老师
     */
    public static final String   GROUP_TEACHER                  = "小课老师";

    /**
     * redis中已离开馆学生键值对的key的前缀，完整key为：key的前缀+馆id
     */
    public static final String EXITED_STUDENT_PREFIX = "EXITED_STUDENT_";

    /**
     * redis中同步锁key的前缀，完整key为：key的前缀+学生id
     */
    public static final String SIGN_LOCK_PREFIX = "SIGN_LOCK_";

    /**
     * redis中es保存出错的题目id的key
     */
    public static final String ES_SAVE_ERROR_QUESTIONS = "ES_SAVE_ERROR_QUESTIONS";

    /**
     * 各端app平台类型
     */
    public static final Integer CONCH_PLATFORM_TYPE = 1;
    public static final Integer PARENT_PLATFORM_TYPE = 2;
    public static final Integer STUDENT_PLATFORM_TYPE = 3;
    public static final Integer TEACHER_PLATFORM_TYPE = 4;
    public static final Integer SCHOOL_MASTER_PLATFORM_TYPE = 5;

    public static final String PREVIOUS50_HOMEWORK_RANK = "PREVIOUS50_HOMEWORK_RANK";

    public static final String EXCLUDED_KD_ID_OF_TRAIN_RECOMMEND = "EXCLUDED_KD_ID_OF_TRAIN_RECOMMEND";

    public static final Map<String, String> ZYB_CARD_TYPE      = new HashMap<String, String>();

    public static final String TEACHERAPP_URL = "https://img.sharingschool.com/aijiaH5/SSJAPPDownload/teacher.html";

    public static final String PARENTAPP_URL = "https://img.sharingschool.com/aijiaH5/SSJAPPDownload/user.html";

    /**
     * 练习册最大数量
     */
    public static final int MAX_ROWS_COUNT = 5000;

    /**
     * 练习册题目类型
     */
    public static final Map<Integer, String> QUESTION_TYPE_MAP = new HashMap<>();

    static {
        SERVICE_MAP.put("S003", "作业吧");
        SERVICE_MAP.put("S010", "一对一");

        ZYB_CARD_TYPE.put("C001", "年卡");
        ZYB_CARD_TYPE.put("C002", "半年卡");
        ZYB_CARD_TYPE.put("C003", "月卡");
        ZYB_CARD_TYPE.put("C004", "作业吧月卡");
        ZYB_CARD_TYPE.put("C005", "作业吧半年卡");
        ZYB_CARD_TYPE.put("C006", "作业吧年卡");
        ZYB_CARD_TYPE.put("C015", "季度卡");

        QUESTION_TYPE_MAP.put(1, "选择题");
        QUESTION_TYPE_MAP.put(2, "多选项");
        QUESTION_TYPE_MAP.put(3, "填空题");
        QUESTION_TYPE_MAP.put(4, "简答题");
        QUESTION_TYPE_MAP.put(6, "计算题");
        QUESTION_TYPE_MAP.put(7, "作文题");
        QUESTION_TYPE_MAP.put(8, "判断题");
        QUESTION_TYPE_MAP.put(9, "连线题");
        QUESTION_TYPE_MAP.put(10, "翻译题");
        QUESTION_TYPE_MAP.put(11, "匹配题");
        QUESTION_TYPE_MAP.put(12, "阅读题");
        QUESTION_TYPE_MAP.put(13, "语音题");
        QUESTION_TYPE_MAP.put(14, "操作题");
        QUESTION_TYPE_MAP.put(16, "课外阅读题");
        QUESTION_TYPE_MAP.put(17, "解决问题");
        QUESTION_TYPE_MAP.put(18, "看图列式");
        QUESTION_TYPE_MAP.put(19, "情景交际");
        QUESTION_TYPE_MAP.put(20, "听力题");
        QUESTION_TYPE_MAP.put(21, "口语题");
        QUESTION_TYPE_MAP.put(22, "课内阅读题");
        QUESTION_TYPE_MAP.put(23, "朗读背诵题");
    }

    public static final String getSubjectFromRequest (String subject){
        if("YUWEN".equals(subject)) {
            subject = "语文";
        } else if ("YINGYU".equals(subject)) {
            subject = "英语";
        } else if ("SHUXUE".equals(subject)) {
            subject = "数学";
        }
        return subject;
    }

}
